package com.kun.portal.webframe.dao;

import com.kun.portal.webframe.po.EquipmentPo;
import com.kun.portal.webframe.po.FlightInfoPo;
import com.kun.portal.webframe.po.FlightPlanePo;
import com.kun.portal.webframe.po.RoomPo;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.domain.Sort;
import org.springframework.data.jpa.domain.Specification;
import org.springframework.data.jpa.repository.EntityGraph;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

import java.util.List;

/**
 * Created by Administrator on 2018/5/8.
 */
public interface FlightInfoDao extends JpaRepository<FlightInfoPo, String>, JpaSpecificationExecutor<FlightInfoPo> {
    @EntityGraph(value="flightInfoLazy",type= EntityGraph.EntityGraphType.FETCH)
    public Page<FlightInfoPo> findAll(Pageable pageable);
    @EntityGraph(value="flightInfoLazy",type= EntityGraph.EntityGraphType.FETCH)
    public Page<FlightInfoPo> findAll(Specification<FlightInfoPo> specification, Pageable pageable);
    public List<FlightInfoPo> findAll(Sort sort);
    public List<FlightInfoPo> findAll(Specification<FlightInfoPo> specification, Sort sort);

}
